package week08.company;

/**
 * Created by zhangxiaokun on 2018/3/20.
 */
public class Development implements Department {
    private Mediator mediator;          //持有中介者的引用
    private String dname = DepartmentName.Development;

    public Development(Mediator mediator) {
        this.mediator = mediator;
        mediator.register(dname, this);
    }


    @Override
    public void selfAction() {
        System.out.println("....开发....撸代码");
    }

    @Override
    public void outAction() {
        System.out.println("....向经理接需求");
        mediator.command(DepartmentName.Market);
    }
}
